import axios from '@/libs/api.request'
// 获取工种
export const getworktype = () => {
  return axios.request({
    url: '/index/worktype/getlistonepageforadmin',
    method: 'post',
    data: {}
  })
}

export const saveinvent = formData => {
  return axios.request({
    url: '/index/invent/releaseinvent',
    method: 'post',
    data: formData
  })
}

export const getinventlist = searchData => {
  return axios.request({
    url: '/index/invent/querylistallforadmin',
    method: 'post',
    data: searchData
  })
}

export const updateinvent = formData => {
  return axios.request({
    url: '/index/invent/updateinventfromadmin',
    method: 'post',
    data: formData
  })
}

export const getinventinfo = id => {
  return axios.request({
    url: '/index/invent/queryinfobyidforadmin',
    method: 'post',
    data: { id: id }
  })
}

// 招工禁用
export const inventunactive = ({ id, wuid }) => {
  return axios.request({
    // url: '/index/invent/updateisactivebyidforapp',
    url: '/index/invent/updateisactivebyidforadmin',
    method: 'post',
    data: { id, wuid }
  })
}

// 招工审核
export const updateispassbyid = ({ idlist, ispass, wuid }) => {
  return axios.request({
    url: '/index/invent/updateispassbyid',
    method: 'post',
    data: { idlist, ispass, wuid }
  })
}

// 找活列表
export const getjobhuntinglist = searchData => {
  return axios.request({
    url: '/index/jobhunting/querylistallforadmin',
    method: 'post',
    data: searchData
  })
}

// 找活审核
export const updatejobhuntingispassbyid = ({ idlist, ispass, wuid }) => {
  return axios.request({
    url: '/index/jobhunting/updateispassbyid',
    method: 'post',
    data: { idlist, ispass, wuid }
  })
}

// 找活修改
export const updateinfoforadmin = formData => {
  return axios.request({
    url: '/index/jobhunting/updateinfoforadmin',
    method: 'post',
    data: formData
  })
}
